<?php /* Smarty version Smarty-3.1.12, created on 2016-07-11 14:17:24
         compiled from "D:\phpStudy\WWW\demonew\dm\xycms\product.tpl" */ ?>
<?php /*%%SmartyHeaderCode:12861578339f4039541-06669934%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c6bd4dfa5b18bc0771347dae7e52fdd60d617979' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\demonew\\dm\\xycms\\product.tpl',
      1 => 1467874009,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '12861578339f4039541-06669934',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'page_charset' => 0,
    'copyright_author' => 0,
    'action' => 0,
    'cate_search' => 0,
    'sname' => 0,
    'uc_adminname' => 0,
    'product' => 0,
    'volist' => 0,
    'page' => 0,
    'urlitem' => 0,
    'total' => 0,
    'cate_select' => 0,
    'pagecount' => 0,
    'showpage' => 0,
    'recommend' => 0,
    'isnew' => 0,
    'cid' => 0,
    'size' => 0,
    'tailword' => 0,
    'tags' => 0,
    'tag' => 0,
    'flag_checkbox' => 0,
    'elite_checkbox' => 0,
    'isnew_checkbox' => 0,
    'cityword' => 0,
    'comeurl' => 0,
    'id' => 0,
    'taggu' => 0,
    'post' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_578339f4275f16_60614342',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_578339f4275f16_60614342')) {function content_578339f4275f16_60614342($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_truncate')) include 'D:\\phpStudy\\WWW\\demonew\\source\\core\\plugins\\modifier.truncate.php';
if (!is_callable('smarty_modifier_date_format')) include 'D:\\phpStudy\\WWW\\demonew\\source\\core\\plugins\\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_smarty_tpl->tpl_vars['page_charset']->value;?>
" />
<title>产品内容</title>
<meta name="author" content="<?php echo $_smarty_tpl->tpl_vars['copyright_author']->value;?>
" />
<link type="text/css" rel="stylesheet" href="xycms/css/admin.css" media="screen" />
<link rel="stylesheet" href="../data/editor/themes/default/default.css" />
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='js/command.js'></script>
<link rel="stylesheet" href="../ueditor/themes/default/css/ueditor.css" type="text/css">
<script type="text/javascript" charset="utf-8" src="../data/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../data/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../data/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<?php if ($_smarty_tpl->tpl_vars['action']->value==''){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：产品管理<span>&gt;</span>产品展示</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="xycms_product.php?action=add" class="btn-general">发布产品</a>产品展示</h3>
	<div class="search-area ">
	  <form method="post" id="search_form" action="xycms_product.php">
	  <div class="item">
	    <label>产品分类：</label><?php echo $_smarty_tpl->tpl_vars['cate_search']->value;?>
&nbsp;&nbsp;
		<label>标题：</label><input type="text" id="sname" name="sname" size="20" class="input input-text" value="<?php echo $_smarty_tpl->tpl_vars['sname']->value;?>
" />&nbsp;&nbsp;&nbsp;
		<input type="submit" class="button_s" value="搜 索" />
	  </div>
	  </form>
	</div>
	<form action="xycms_product.php" method="post" name="myform" id="myform" style="margin:0">
	<input type="hidden" name="action" id="action" value="del" />
    <input type="hidden" name="cate" id="cate" value="" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" align="center">
	  <thead class="tb-tit-bg">
	  <tr>
	    <th width="30"><div class="th-gap">选择</div></th>
		<th width="20%"><div class="th-gap">所在分类</div></th>
		<th width="48"><div class="th-gap">排序</div></th>
		<th width="40"><div class="th-gap">预览图</div></th>
		<?php if ($_smarty_tpl->tpl_vars['uc_adminname']->value=='master'){?>
		<th width="32%"><div class="th-gap">产品名称</div></th>
		<?php }else{ ?>
		<th width="50%"><div class="th-gap">产品名称</div></th>
		<?php }?>
		<th width="30"><div class="th-gap">浏览</div></th>
		<th width="30"><div class="th-gap">状态</div></th>
		<th width="30"><div class="th-gap">推荐</div></th>		
		<th width="30"><div class="th-gap">新品</div></th>
		<th width="125"><div class="th-gap">录入时间</div></th>
		<th width="135"><div class="th-gap">操作</div></th>
	  </tr>
	  </thead>
	  <tfoot class="tb-foot-bg"></tfoot>
	  <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['product']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
	  <tr onmouseover="overColor(this)" onmouseout="outColor(this)">
	    <td align="center"><input name="id[]" class="id" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" onclick="checkItem(this, 'chkAll')" /></td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['cname'];?>
</td>
     	<td align="center">
        <input type="text" name="orders[]" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['orders'];?>
" class="orders" />
        </td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['thumbfiles']!=''){?>
		<a href="../<?php echo $_smarty_tpl->tpl_vars['volist']->value['uploadfiles'];?>
" target="_blank"><img src="../<?php echo $_smarty_tpl->tpl_vars['volist']->value['thumbfiles'];?>
" width="40" height="25" border="0" /></a>
		<?php }else{ ?>
		<img src="../template/static/images/s_nopic.jpg" width="40" height="25" border="0" />
		<?php }?>
        </td>
		<td align="left"><a href="../product/<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
.html" target="_blank"><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['volist']->value['title'],40);?>
</a></td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['hits'];?>
</td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['flag']==0){?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="flagopen" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/no.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }else{ ?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="flagclose" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/yes.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }?>
        </td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['elite']==0){?>
			<input type="hidden" id="attr_elite<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="eliteopen" />
			<img id="elite<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/no.gif" onclick="javascript:fetch_ajax('elite','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }else{ ?>
			<input type="hidden" id="attr_elite<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="eliteclose" />
			<img id="elite<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/yes.gif" onclick="javascript:fetch_ajax('elite','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }?>
        </td>
        <td align="center">
 		<?php if ($_smarty_tpl->tpl_vars['volist']->value['isnew']==0){?>
			<input type="hidden" id="attr_isnew<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="isnewopen" />
			<img id="isnew<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/no.gif" onclick="javascript:fetch_ajax('isnew','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }else{ ?>
			<input type="hidden" id="attr_isnew<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="isnewclose" />
			<img id="isnew<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/yes.gif" onclick="javascript:fetch_ajax('isnew','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }?>       
        </td>
		<td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['volist']->value['timeline'],"%Y/%m/%d");?>
</td>

	<td align="center"><a href="xycms_product.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
&page=<?php echo $_smarty_tpl->tpl_vars['page']->value;?>
&<?php echo $_smarty_tpl->tpl_vars['urlitem']->value;?>
" class="icon-edit">修改</a>&nbsp;&nbsp;<a href="xycms_product.php?action=del&id[]=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" onclick="{if(confirm('确定要删除该信息?')){return true;} return false;}" class="icon-del">删除</a></td>
	  </tr>
	  <?php }
if (!$_smarty_tpl->tpl_vars['volist']->_loop) {
?>
      <tr>
	    <td colspan="13" align="center">暂无信息</td>
	  </tr>
	  <?php } ?>
	  <?php if ($_smarty_tpl->tpl_vars['total']->value>0){?>
	  <tr>
		<td align="center"><input name="chkAll" type="checkbox" id="chkAll" onclick="checkAll(this, 'id[]')" value="checkbox" /></td>
		<td class="hback" colspan="10">
        <input class="button" name="btn_del" type="button" value="删 除" onclick="{if(confirm('确定删除选定信息吗!?')){$('#action').val('del');$('#myform').submit();return true;}return false;}" class="button" />&nbsp;&nbsp;共[ <b><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
</b> ]条记录
        <input class="button" id="order_btn" name="order_btn" type="button" value="更新排序" class="button" />
        <span id="p_move">移动到:</span>
        <span id="move_select"><?php echo $_smarty_tpl->tpl_vars['cate_select']->value;?>
</span>
        </td>
      </tr>
	  <?php }?>
	</table>
	</form>
	<?php if ($_smarty_tpl->tpl_vars['pagecount']->value>1){?>
	<table width='95%' border='0' cellspacing='0' cellpadding='0' align='center' style="margin-top:10px;">
	  <tr>
		<td align='center'><?php echo $_smarty_tpl->tpl_vars['showpage']->value;?>
</td>
	  </tr>
	</table>
	<?php }?>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="recommend"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：产品管理<span>&gt;</span>推荐产品</p></div>
   <div class="main-cont">
   	<h3 class="title"><a href="xycms_product.php" class="btn-general">全部产品</a>
   	<a href="javascript:;" class="update_orders">更新排序</a>推荐产品</h3>
   	<div class="list">
   	  <ul class="clearfix recommend">
   	    <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['recommend']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
   	     <li>
   	     <a class="pic" href="../product/<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
.html" target="_blank"><img src="../<?php echo $_smarty_tpl->tpl_vars['volist']->value['thumbfiles'];?>
" /></a>
   	     <a href="#" class="name"><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['volist']->value['title'],18);?>
</a>
   	     <div class="opera"><a href="javascript:;" class="remove" type="elite" rel="<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
">移除</a><a href="xycms_product.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" class="edit">修改</a><span>排序:</span><input type="text" name="orders" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['elite_orders'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" class="orders" /></div>
   	     </li>
   	    <?php } ?>
   	  </ul>
   	</div>
   </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="isnew"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：产品管理<span>&gt;</span>最新产品</p></div>
   <div class="main-cont">
   	<h3 class="title"><a href="xycms_product.php" class="btn-general">全部产品</a>
   	<a href="javascript:;" class="update_orders">更新排序</a>最新产品</h3>
   	<div class="list">
   	  <ul class="clearfix recommend">
   	    <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['isnew']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
   	     <li>
   	     <a class="pic"><img src="../<?php echo $_smarty_tpl->tpl_vars['volist']->value['thumbfiles'];?>
" /></a>
   	     <a href="#" class="name"><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['volist']->value['title'],8);?>
</a>
   	     <div class="opera"><a href="javascript:;" class="remove" type="isnew" rel="<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
">移除</a><a href="xycms_product.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" class="edit">修改</a><span>排序:</span><input type="text" name="orders" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['isnew_orders'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" class="orders" /></div>
   	     </li>
   	    <?php } ?>
   	  </ul>
   	</div>
   </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="add"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：内容管理<span>&gt;</span>发布产品</p></div>
  <div class="main-cont">
	<h3 class="title title_padding"><a href="xycms_product.php" class="btn-general">返回列表</a><span class="pro_hover">产品基本信息</span><span>产品配置信息</span></h3>
    <form name="myform" id="myform" method="post" action="xycms_product.php" onsubmit='return checkform();'>
    <input type="hidden" name="action" value="saveadd" />
    <input type="hidden" name="add_cid" id="add_cid" value="<?php echo $_smarty_tpl->tpl_vars['cid']->value;?>
" />
	<table class='tab product_tj table_form'>
	  <tr>
		<th width="80">产品分类 <span class='f_red'></span></th>
		<td colspan="2"><?php echo $_smarty_tpl->tpl_vars['cate_select']->value;?>
 <span id="dcateid" class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>产品名称 <span class="f_red">*</span> </th>
		<td colspan="2"><input type="text" name="title" id="title" class="input-txt" /> <span id='dproductname' class='f_red'></span>
        <input type="radio" name="taggu" class="post1" value="1"  />&nbsp;&nbsp;关键词开启&nbsp;&nbsp;<input type="radio" name="taggu" class="post1" value="0" checked="checked" />&nbsp;&nbsp;关闭
		</td>
	  </tr>	
	  <tr>
		<th>产品图片 <span class="f_red"></span> </th>
		<td style="width:305px;">
		  <input type="hidden" name="uploadfiles" id="uploadfiles" />
		  <input type="hidden" name="thumbfiles" id="thumbfiles" />
		  <img class='upload_img' /><a href="javascript:void(0)" class="pic_remove">删除</a>
		  <iframe id='iframe_t' frameborder='0' scrolling='no' width='305' height='25' src='upload_input.php?filepath=product'></iframe>
        </td>
        <td style=""><?php echo $_smarty_tpl->tpl_vars['size']->value;?>
</td>
	  </tr>
	  <tr>
		<th>长尾词</th>
		<td colspan="2">
		<input type="text" name="nagao" id="nagao" style="cursor:not-allowed;" readonly="readonly" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['tailword']->value;?>
" />
        <label><input type="radio" name="post" class="post" value="1" onclick="javascript:addword1()" />&nbsp;&nbsp;前缀&nbsp;&nbsp;</label><label><input type="radio" name="post" class="post" value="2" checked="checked" onclick="javascript:addword2()" />&nbsp;&nbsp;后缀&nbsp;&nbsp;</label><label><input type="radio" name="post" class="post" value="3" onclick="javascript:addword3()" />&nbsp;&nbsp;关闭</label>
		</td>
	  </tr>
	  <tr>
		<th>相关关键词</th>
		<td colspan="2">
		<input type="text" name="tag" id="tag" class="input-txt" />
		<span id="smart_keywords">自动选择</span>
		<span id='dtag' class='f_red'></span> (多个请用英文,号隔开)
		</td>
	  </tr>
      <tr style="display:none;">
		<th><span id="t1">手动选择</span></th>
		<td class='hback f_tag' colspan="2">
           <?php  $_smarty_tpl->tpl_vars['tag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['tags']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['tag']->key => $_smarty_tpl->tpl_vars['tag']->value){
$_smarty_tpl->tpl_vars['tag']->_loop = true;
?>
             <a href="javascript:void(0)"><?php echo $_smarty_tpl->tpl_vars['tag']->value;?>
</a>
           <?php } ?>
        </td>
	  </tr> 
	  <tr>
		<th>状态设置 </th>
		<td colspan="2"><?php echo $_smarty_tpl->tpl_vars['flag_checkbox']->value;?>
，<?php echo $_smarty_tpl->tpl_vars['elite_checkbox']->value;?>
，<?php echo $_smarty_tpl->tpl_vars['isnew_checkbox']->value;?>
</td>
	  </tr>
	  <tr>
		<th>详细介绍 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container" name="content" type="text/javascript"></script>
		  <script type="text/javascript">var ue = UE.getEditor('container');</script>
		  <span id='dcontent' class='f_red'></span>
		</td>
	  </tr>
	  <tr>
		<th>扩展标签1 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container1" name="extend1" type="text/javascript"></script>
		  <script type="text/javascript">var ue1 = UE.getEditor('container1');</script>
		  <span id='dcontent' class='f_red'></span>
		</td>
	  </tr> 
	  <tr>
		<th>扩展标签2 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container2" name="extend2" type="text/javascript"></script>
		  <script type="text/javascript">var ue2 = UE.getEditor('container2');</script>
		  <span id='dcontent' class='f_red'></span>
		  </td>
	  </tr> 
	  <tr>
		<th>扩展标签3 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container3" name="extend3" type="text/javascript"></script>
		  <script type="text/javascript">var ue3 = UE.getEditor('container3');</script>
		  <span id='dcontent' class='f_red'></span>
		  </td>
	  </tr> 
	  <tr>
		<th>产品编号 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="productnum" id="productnum" class="input-txt" /> <span id='dproductnum' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>产品价格 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="price" id="price" class="input-s" /> （填写数字，单位为人民币￥） <span id='dprice' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>浏览次数 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="hits" id="hits" class="input-s" /> <span id='dhits' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>扩展字段1 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="wrext1" id="wrext1" class="input-txt" /> <span id='dwrext1' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>扩展字段2 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="wrext2" id="wrext2" class="input-txt" /> <span id='dwrext2' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>扩展字段3 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="wrext3" id="wrext3" class="input-txt" /> <span id='dwrext3' class='f_red'></span></td>
	  </tr>

	</table>
	<table class='table_form' style="display:none;">
	  <tr>
		<th width="80">Title：<span class='f_red'></span></th>
		<td><input type="text" name="ptitle" id="ptitle" class="input-txt" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th width="80">Keywords：<span class='f_red'></span></th>
		<td><input type="text" name="pkeywords" id="pkeywords" class="input-txt" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th>Description：</th>
		<td>
			<textarea name="pdescription" id="pdescription" style='width:60%;height:65px;overflow:auto;color:#444444;'></textarea><br />（200字符以内）
		</td>
	  </tr>
	</table>
	<table class='table_form'>
	  <tr>
		<th width="80"></th>
		<td ><input type="submit" name="btn_save" class="button" value="添加保存" /></td>
	  </tr>
	</table>	
	</form>
	<div style='height:30px'>
	</div>
  </div>
  <div style="clear:both;"></div>
</div>
<script type="text/javascript">
function addword1(){
  var word="<?php echo $_smarty_tpl->tpl_vars['cityword']->value;?>
";
  $("#nagao").val(word); 
}
function addword2(){
  var word="<?php echo $_smarty_tpl->tpl_vars['tailword']->value;?>
";
  $("#nagao").val(word);

}
function addword3(){
  var word="";
  $("#nagao").val(word);

}
</script>
<script type="text/javascript">
    $(".title span").click(function(){
    	var index = $(this).index();
    	$(this).addClass("pro_hover").siblings("span").removeClass("pro_hover");
    	if(index == 1){
    		$("#myform .table_form").eq(0).show();
    		$("#myform .table_form").eq(1).hide();
    	}else if(index == 2){
    		$("#myform .table_form").eq(1).show();
    		$("#myform .table_form").eq(0).hide();	
    	}
    });
</script>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="edit"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：内容管理<span>&gt;</span>编辑产品</p></div>
  <div class="main-cont">
	<h3 class="title title_padding"><a href="xycms_product.php?<?php echo $_smarty_tpl->tpl_vars['comeurl']->value;?>
" class="btn-general">返回列表</a><span class="pro_hover">产品基本信息</span><span>产品配置信息</span></h3>
    <form name="myform" id="myform" method="post" action="xycms_product.php" onsubmit='return checkform();'>
    <input type="hidden" name="action" value="saveedit" />
	<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" />
	<input type="hidden" name="page" value="<?php echo $_smarty_tpl->tpl_vars['page']->value;?>
" />
	<table class='tab product_tj table_form'>
	  <tr>
		<th width="80">产品分类 <span class='f_red'></span></th>
		<td colspan="2"><?php echo $_smarty_tpl->tpl_vars['cate_select']->value;?>
 <span id="dcateid" class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>产品名称 <span class="f_red">*</span> </th>
		<td colspan="2"><input type="text" name="title" id="title" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['title'];?>
" /> <span id='dproductname' class='f_red'></span>
        <input type="radio" name="taggu" class="post1" <?php if ($_smarty_tpl->tpl_vars['taggu']->value==1){?>checked="checked"<?php }?> value="1"  />&nbsp;&nbsp;关键词开启&nbsp;&nbsp;<input type="radio" name="taggu" class="post1" <?php if ($_smarty_tpl->tpl_vars['taggu']->value==0){?>checked="checked"<?php }?> value="0" />&nbsp;&nbsp;关闭
		</td>
	  </tr>  
	  <tr>
		<th>产品图片 <span class="f_red"></span></th>
		<td style="width:305px;">
		  <input type="hidden" name="uploadfiles" id="uploadfiles" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['uploadfiles'];?>
" />
		  <input type="hidden" name="thumbfiles" id="thumbfiles"  value="<?php echo $_smarty_tpl->tpl_vars['product']->value['thumbfiles'];?>
" />
		  <?php if ($_smarty_tpl->tpl_vars['product']->value['thumbfiles']!=''){?>
		  	 <img class='upload_img' src="../<?php echo $_smarty_tpl->tpl_vars['product']->value['thumbfiles'];?>
" />
		  	 <a href="javascript:void(0)" class="pic_remove">[删除]</a>
		 <?php }else{ ?>
		     <img class='upload_img' /> 
		     <a href="javascript:void(0)" class="pic_remove">[删除]</a>
		  <?php }?>
		  <iframe id='iframe_t' frameborder='0' scrolling='no' width='305' height='25' src='upload_input.php?filepath=product'></iframe>
		  <script type="text/javascript">
		   var t = "<?php echo $_smarty_tpl->tpl_vars['product']->value['thumbfiles'];?>
";
		    if(t != ''){
		    	$(".upload_img").css("display","block");
		    	$(".pic_remove").css("display","block");
		    	$("#iframe_t").css("display","none");
		    }
		  </script>	
		</td>
		<td style=""><?php echo $_smarty_tpl->tpl_vars['size']->value;?>
</td>
	  </tr> 
	  <tr>
		<th>长尾词</th>
		<td colspan="2">
		<input type="text" name="nagao" id="nagao" style="cursor:not-allowed;" readonly="readonly" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['nagao'];?>
" />
        <label><input type="radio" name="post" class="post" value="1" onclick="javascript:addword3()" />&nbsp;&nbsp;前缀&nbsp;&nbsp;</label><label><input type="radio" name="post" class="post" value="2" onclick="javascript:addword4()" />&nbsp;&nbsp;后缀&nbsp;&nbsp;</label><label><input type="radio" name="post" class="post" value="3" onclick="javascript:addword5()" />&nbsp;&nbsp;关闭</label>
		</td>
	  </tr>
	  <tr>
		<th>相关关键词</th>
		<td colspan="2"><input type="text" name="tag" id="tag" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['tag'];?>
" /> <span id="smart_keywords">自动选择</span> <span id='dtag' class='f_red'></span> (多个请用英文,号隔开)</td>
	  </tr> 
      <tr  style="display:none;">
		<th><span id="t1">手动选择</span></th>
		<td class='hback f_tag' colspan="2">
           <?php  $_smarty_tpl->tpl_vars['tag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['tags']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['tag']->key => $_smarty_tpl->tpl_vars['tag']->value){
$_smarty_tpl->tpl_vars['tag']->_loop = true;
?>
             <?php if ($_smarty_tpl->tpl_vars['tag']->value['mark']=="1"){?>
              <a href="javascript:void(0)" class="over"><?php echo $_smarty_tpl->tpl_vars['tag']->value['name'];?>
</a>
             <?php }else{ ?>
              <a href="javascript:void(0)"><?php echo $_smarty_tpl->tpl_vars['tag']->value['name'];?>
</a>
             <?php }?>
           <?php } ?>
        </td>
	  </tr>   
	  <tr>
		<th>状态设置 </th>
		<td colspan="2"><?php echo $_smarty_tpl->tpl_vars['flag_checkbox']->value;?>
，<?php echo $_smarty_tpl->tpl_vars['elite_checkbox']->value;?>
，<?php echo $_smarty_tpl->tpl_vars['isnew_checkbox']->value;?>
</td>
	  </tr>
	  <tr>
		<th>详细内容 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container" name="content" type="text/javascript"><?php echo $_smarty_tpl->tpl_vars['product']->value['content'];?>
</script>
		  <script type="text/javascript">var ue = UE.getEditor('container');</script>
		</td>
	  </tr>
	  <tr>
		<th>扩展标签1 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container1" name="extend1" type="text/javascript"><?php echo $_smarty_tpl->tpl_vars['product']->value['extend1'];?>
</script>
		  <script type="text/javascript">var ue1 = UE.getEditor('container1');</script>
		  <span id='dcontent' class='f_red'></span>
		  </td>
	  </tr>
	  <tr>
		<th>扩展标签2 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container2" name="extend2" type="text/javascript"><?php echo $_smarty_tpl->tpl_vars['product']->value['extend2'];?>
</script>
		  <script type="text/javascript">var ue2 = UE.getEditor('container2');</script>
		  <span id='dcontent' class='f_red'></span>
		  </td>
	  </tr> 
	  <tr>
		<th>扩展标签3 <span class="f_red">*</span></th>
		<td colspan="2">
		  <script id="container3" name="extend3" type="text/javascript"><?php echo $_smarty_tpl->tpl_vars['product']->value['extend3'];?>
</script>
		  <script type="text/javascript">var ue3 = UE.getEditor('container3');</script>
		  <span id='dcontent' class='f_red'></span>
		  </td>
	  </tr>
	  <tr>
		<th>产品编号 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="productnum" id="productnum" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['productnum'];?>
" /> <span id='dproductnum' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>产品价格 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="price" id="price" class="input-s" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['price'];?>
" /> （填写数字，单位为人民币￥） <span id='dprice' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>浏览次数 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="hits" id="hits" class="input-s" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['hits'];?>
" /> <span id='dhits' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>扩展字段1 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="wrext1" id="wrext1" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['wrext1'];?>
" /> <span id='dwrext1' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>扩展字段2 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="wrext2" id="wrext2" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['wrext2'];?>
" /> <span id='dwrext2' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>扩展字段3 <span class="f_red"></span></th>
		<td colspan="2"><input type="text" name="wrext3" id="wrext3" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['wrext3'];?>
" /> <span id='dwrext3' class='f_red'></span></td>
	  </tr>
	</table>
	<table class='table_form' style="display:none;">
	  <tr>
		<th width="80">Title：<span class='f_red'></span></th>
		<td><input type="text" name="ptitle" id="ptitle" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['ptitle'];?>
" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th width="80">Keywords：<span class='f_red'></span></th>
		<td><input type="text" name="pkeywords" id="pkeywords" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['product']->value['pkeywords'];?>
" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th>Description：</th>
		<td>
			<textarea name="pdescription" id="pdescription" style='width:60%;height:65px;overflow:auto;color:#444444;'><?php echo $_smarty_tpl->tpl_vars['product']->value['pdescription'];?>
</textarea><br />（200字符以内）
		</td>
	  </tr>
	</table>
	<table class='table_form'>
	  <tr>
		<th width="80"></th>
		<td><input type="submit" name="btn_save" class="button" value="更新保存" /></td>
	  </tr>
	</table>	
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<script  type="text/javascript">
//链接内型和打开方式		
$(function(){
if(<?php echo $_smarty_tpl->tpl_vars['post']->value;?>
 == 1){
  $(".post:eq(0)").attr("checked",true);
  }else if(<?php echo $_smarty_tpl->tpl_vars['post']->value;?>
 == 2){
  $(".post:eq(1)").attr("checked",true);
   }else if(<?php echo $_smarty_tpl->tpl_vars['post']->value;?>
 == 3){
  $(".post:eq(2)").attr("checked",true);
   } 

 });
function addword3(){
  var word="<?php echo $_smarty_tpl->tpl_vars['cityword']->value;?>
";
  $("#nagao").val(word); 
}
function addword4(){
  var word="<?php echo $_smarty_tpl->tpl_vars['tailword']->value;?>
";
  $("#nagao").val(word);

}
function addword5(){
  var word="";
  $("#nagao").val(word);

}
</script>
<script type="text/javascript">
    $(".title span").click(function(){
    	var index = $(this).index();
    	$(this).addClass("pro_hover").siblings("span").removeClass("pro_hover");
    	if(index == 1){
    		$("#myform .table_form").eq(0).show();
    		$("#myform .table_form").eq(1).hide();
    	}else if(index == 2){
    		$("#myform .table_form").eq(1).show();
    		$("#myform .table_form").eq(0).hide();	
    	}
    });
</script>
<?php }?>
<script type="text/javascript" src="js/check.js"></script>
</body>
</html><?php }} ?>